<template>
  <el-carousel height="450px" :interval="5000">
    <el-carousel-item v-for="item in getSlideShow" :key="item.carousel_id">
      <img :src="$getImg + item.imgPath" alt="" />
    </el-carousel-item>
  </el-carousel>
</template>

<script>
import PhoneAPI from "@/api/PageAPI/HomeAPI.js";
export default {
  name: "",
  data() {
    return {
      getSlideShow: [],
    };
  },
  created() {
    this.Imgs();
  },
  mounted() {},
  methods: {
    async Imgs() {
      const res = await PhoneAPI.getSlideshow();
      // console.log(res);
      this.getSlideShow = res.carousel;
    },
  },
  computed: {},
  watch: {},
};
</script>

<style scoped>
.el-carousel {
  margin: 20px 40px;
}
.el-carousel__item h3 {
  color: #475669;
  font-size: 14px;
  opacity: 0.75;
  line-height: 150px;
  margin: 0;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
img {
  width: 100%;
  height: 100%;
}
</style>
